<table class="table">
  <tr>
    <th>ID</th>
    <th>标题</th>
    <th>作者</th>
    <th>访问次数</th>
    <th>时间</th>
  </tr>
  <% @blogs.each do |blog| %>
    <tr>
      <td><%= blog.id %></td>
      <td>
        <%= link_to blog.title, blog_path(blog) %>
      </td>
      <td><%= blog.user.email %></td>
      <td><%= blog.access_count %></td>
      <td><%= blog.created_at.strftime("%Y-%m-%d %H:%M:%S") %></td>
    </tr>
  <% end -%>
</table>
<div class="text-center">
  <%= will_paginate @blogs, :previous_label => '上一页', :next_label => '下一页', renderer: BootstrapPagination::Rails %>
</div>